package com.szu.subject.ui.service;

import java.util.List;
import java.util.Map;

import com.szu.subject.domains.Course;
import com.szu.subject.domains.Selection;
import com.szu.subject.domains.Student;

public interface StudentService {

	/**
	 * 通过id获得账户信息
	 * @param id 账户id
	 * @return
	 */
	public Student getStudentByPK(Long id);
	
	/**
	 * 通过学生地获得选课情况
	 * @param id 学生id
	 * @return
	 */
	public List<Course> getCourses(Long id);
	
	/**
	 * 选课,加逻辑
	 * @param idMap
	 * @return
	 */
	public int addCourse( Selection selection);
	
	/**
	 * 退课
	 * @param idMap
	 * @return
	 */
	public int removeCourse( Selection selection);
	
	/**
	 * 判断选的课程是否冲突
	 * @param timeId
	 * @param newTimeId
	 * @return
	 */
	public boolean isConflict(List<Long> timeId,Long newTimeId);
	
	
	public Student createStudent(Student student);
	
	public Student updateStudent(Student student);
	
	public int deleteStudent(Long id);
	
	public List<Student> batchCreateStudents(List<Student> students);
	
	public List<Student> batchUpdateStudents(List<Student> students);
	
	public int batchDeleteStudents(List<Long> ids);

	public Student getStudentByAccount(String account);
}
